lane :release_pod do |options|


      target_project = read_podspec['name']
      target_version = options[:version]
      spec_path = "#{target_project}.podspec"

    if !target_version 
    UI.error "未传入version 或者version拼写错误"
    return
    end

      # git pull
      git_pull 
      # 确认是 master 分支
      ensure_git_branch


      #远程验证 默认就是allow-warning是的
      pod_spec_lint #这个是自定义action


      # 修改 spec 为即将发布的版本
      version_bump_podspec(path: spec_path, version_number: target_version)


      # 提交代码到远程仓库
      git_add(path: (target_project + "/"))
      git_commit(path: '.')
      push_to_git_remote


      # 检查对于 tag 是否已经存在
      if git_tag_exists(tag: target_version)
          # 删除对应 tag
          remove_git_tag(tag: target_version)  #这个是自定义action
      end
      # 添加 tag
      add_git_tag(tag: target_version)
      # 提交 tag
      push_git_tags


      # 验证 spec 文件
      pod_lib_lint(use_bundle_exec: false, allow_warnings: true)


      #上传本地私有库
      specName = get_pod_repo_name  #这个是自定义action
      pod_push(path: spec_path, repo: 'hywspec', allow_warnings: true)

end
